<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        function fn_123(url, fn) {
            window.onload = function () {
                var vname = 'fn_123' + Math.ceil(Math.random() * 100000000);
                var eleScript = document.createElement('script');
                eleScript.src = url + '?fn_123=' + vname;
                document.head.appendChild(eleScript);
                window[vname] = function (data) {
                    console.log(data)
                    fn(data);
                }
            }
        }
        fn_123('http://106.12.24.181:4019/s2', function (data) {
            console.log(data)
        })
    </script>
</body>

</html>